/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Phan1.LietKe.QuayLui;

/**
 *
 * @author Giaotk
 */
public class DayNhiPhanN {

    int max = 100;
    int[] x = new int[max];
    int n;
    StringBuilder sb = new StringBuilder();

    public DayNhiPhanN(int n) {
        this.n = n;
        Process(0);
        System.out.println(sb);
    }

    public void Process(int i){
        for (int j = 0; j < 2; j++) {
            x[i]=j;
            if (i==n-1) {
                PrintResult();
            }else{
                Process(i+1);
            }
        }
    }
    
    public void PrintResult() {
        for (int i = 0; i < n; i++) {
            sb.append(x[i]);
        }
        sb.append("\n");
    }
    
    
}
